package com.example.Lezedata.dataModel;

import android.os.Bundle;

public class GoodsProjectModel {
    public GoodsInfoModel infoModel;
    // 已经购买
    public int goodsPurchased;

    public GoodsProjectModel () {}

    private static GoodsProjectModel goodsProjectModel;

    public static GoodsProjectModel newInstance() {
        if (goodsProjectModel == null){
            goodsProjectModel = testGoodsProjectModel();
        }
        return goodsProjectModel;
    }

    public static GoodsProjectModel testGoodsProjectModel() {
        GoodsProjectModel projectModel = new GoodsProjectModel();
        projectModel.goodsPurchased = 30;
        GoodsInfoModel model = new GoodsInfoModel();
        model.goodsTotal = 100;
        model.goodsDetail = "苹果手机贼牛逼";
        model.goodsIcon = "http://tbshow.teanbo.com/20190307153941724a75d2847373c456ba0cfc8fc563f8799.jpg";
        model.goodsName = "IPhone x";
        model.goodsPrice = 6399;
        projectModel.infoModel = model;
        return projectModel;
    }

    public static String goodsIcon(){
        return GoodsProjectModel.newInstance().infoModel.goodsIcon;
    }
}
